package com.petecat.interchan.base.warning.rule.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.petecat.interchan.base.warning.rule.entity.BsWarningRule;
import com.petecat.interchan.core.mapper.BaseMapper;
import com.petecat.interchan.protocol.base.rule.dto.BsWarningRuleQryDTO;
import com.petecat.interchan.protocol.base.rule.vo.BsWarningRuleTreeVO;

@Mapper
@Repository
public interface IWarningRuleMapper extends BaseMapper<BsWarningRule, String>{
	
	/**
	 * 新增多条规则
	 * @param config
	 */
	void saveWarningRule(@Param("config") List<BsWarningRule> config);
	
	/**
	 * 查詢Tree 規則
	 * @param bsWarningConfigQryDTO
	 * @return
	 */
	List<BsWarningRuleTreeVO> queryWarningRuleTree(BsWarningRuleQryDTO bsWarningConfigQryDTO);
	
	/**
	 * 通过配置id获取规则
	 * @param configId
	 * @return
	 */
	List<BsWarningRule> queryWarningListById(@Param("configId") String configId);
	
	/**
	 *  通过规则IDS删除规则
	 * @param ruleId
	 */
	void deleteRuleById(@Param("ruleId") String[] ruleId);

}
